Fix BLAS compilation with AdaptiveCpp and export CMake options#7
Merged
Rbiessy merged 4 commits intouxlfoundation:mainfrom Apr 3, 2025
Merged
Fix BLAS compilation with AdaptiveCpp and export CMake options#7Rbiessy merged 4 commits intouxlfoundation:mainfrom
Rbiessy merged 4 commits intouxlfoundation:mainfrom
Conversation
1. Remove unused function enqueue_deallocate in helper.h (left over from refactoring). 2. Add missing BLAS_ENABLE_COMPLEX protection in Gemm::store_packet. 3. Skip second template parameter in vec::load and vec::store when compiling with AdaptiveCpp, which doesn't support it. 4. Improve detection of using AdaptiveCpp in CMake configuration to disable complex data support.
rafbiels
added a commit
to rafbiels/oneMath
that referenced
this pull request
Mar 24, 2025
The generic BLAS backend currently offers limited support for AdaptiveCpp, where: * complex data type is not supported * USM API is not supported Add the required protections to make the generic BLAS backend compile and run correctly in the capacity it offers with AdaptiveCpp. That is, make the buffer USM without complex data work fine. Throw the unimplemented exception for the unsupported features. Note: fixes on the backend side are also required to actually compile, see uxlfoundation/generic-sycl-components#7
3 tasks
Contributor
Author
|
@Rbiessy shall we bump the project version to mark the first version exporting the CMake variables? The dependent projects reading those variables could then require the new version. |
Rbiessy
reviewed
Mar 31, 2025
Contributor
There was a problem hiding this comment.
@Rbiessy shall we bump the project version to mark the first version exporting the CMake variables? The dependent projects reading those variables could then require the new version.
That's a good point yes it makes sense!
I didn't notice that PR before, the changes look good to me, thanks.
Version 0.2.0 now uses CMakePackageConfigHelpers, exports the targets and variables into separate .cmake files (onemath_sycl_blas-targets.cmake and onemath_sycl_blas-config.cmake) and exports the variables BLAS_ENABLE_COMPLEX and BLAS_ENABLE_USM correctly, such that they can be used by dependent projects.
The version file has to be named <config-file-name>-version, otherwise find_package will not find it and set the version to "unknown". Since the config file is named onemath_sycl_blas-config, name the version file onemath_sycl_blas-config-version.
rafbiels
added a commit
to rafbiels/oneMath
that referenced
this pull request
Mar 31, 2025
The generic BLAS backend currently offers limited support for AdaptiveCpp, where: * complex data type is not supported * USM API is not supported Add the required protections to make the generic BLAS backend compile and run correctly in the capacity it offers with AdaptiveCpp. That is, make the buffer USM without complex data work fine. Throw the unimplemented exception for the unsupported features. This change relies on the update of the generic blas backend to version 0.2.0 in: uxlfoundation/generic-sycl-components#7
rafbiels
added a commit
to rafbiels/oneMath
that referenced
this pull request
Mar 31, 2025
The generic BLAS backend currently offers limited support for AdaptiveCpp, where: * complex data type is not supported * USM API is not supported Add the required protections to make the generic BLAS backend compile and run correctly in the capacity it offers with AdaptiveCpp. That is, make the buffer USM without complex data work fine. Throw the unimplemented exception for the unsupported features. This change relies on the update of the generic blas backend to version 0.2.0 in: uxlfoundation/generic-sycl-components#7
Rbiessy
approved these changes
Apr 3, 2025
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
enqueue_deallocateinhelper.h(left over from refactoring).BLAS_ENABLE_COMPLEXprotection inGemm::store_packet.sycl::vec::loadandsycl::vec::storecalls inGemm::store_packetwhen compiling with AdaptiveCpp, which doesn't support it.BLAS_ENABLE_COMPLEXandBLAS_ENABLE_USMsuch that dependent projects can read and use them.